<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="lib/jquery-3.4.1.js"></script>
    <style>
        .current {
            background: red;
        }
    </style>
</head>

<body>
    <p>hello world</p>
    <button id="add">addClass</button>
    <button id="remove">removeClass</button>
    <button id="toggle">toggleClass</button>
    <button id="delete">delete</button>
    <script>
        /* addClass
        removeClass
        toggleClass
        hasClass */
        $("#add").click(function(){
            $("p").addClass("current")
        })
        $("#remove").click(function(){
            $("p").removeClass("current")
        })
        $("#toggle").click(function(){
            $("p").toggleClass("current")
        })
        $("#delete").click(function(){
            // $("p").delete()
        })
    </script>
</body>

</html>